<?php /* @var $this Controller */ ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="language" content="en" />
	<?php $this->Widget('CssWidget')?>
	<title><?php echo CHtml::encode($this->pageTitle); ?></title>
	<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
	
</head>

<body>
	<div class="page">
		<?php $this->Widget('HeaderWidget');?>
		<?php echo $content?>
		<?php $this->Widget('FooterWidget');?>
	</div>
	<div class="feedback">
			<a href="javascript:void(0);" id="btn-feedback"><img src="<?php echo Yii::app()->theme->baseUrl?>/frontend/images/btn-feedback.png" /></a>
	</div>
	<div class="social">
		<a href="#" class="in"></a>
		<a href="#" class="twitter"></a>
		<a href="#" class="princess"></a>
		<a href="#" class="google"></a>
	</div>
	<div id="fb-root"></div>
	<?php
	if(isset(Yii::app()->session['_LOGGED_USER'])){
		$this->widget('PostWidget');
		$this->widget('FeedbackWidget');
	}else{
		$this->Widget('LoginWidget');
		$this->Widget('RegisterWidget');
	}?>
	<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js" ></script>
	<script src="http://malsup.github.com/jquery.form.js"></script> 
	<script src="<?php echo Yii::app()->theme->baseUrl?>/frontend/js/bootstrap-datepicker.js"></script>
	<script src="<?php echo Yii::app()->theme->baseUrl?>/frontend/js/main.js"></script>
	<script type="text/javascript">
    $(document).ready(function() {
        $('#signInButton').click(function() {
            $(this).attr('href','https://accounts.google.com/o/oauth2/auth?scope=' +
            'https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fplus.login&' +
            'state=generate_a_unique_state_value&' +
            'redirect_uri=http://test.searchyardsale.net/app/gglogin&'+
            'response_type=code&' +
            'client_id=93562038814-sa9ih1muinpmvlnbd31dpeel665c7gar.apps.googleusercontent.com&' +
            'access_type=offline');
            return true; // Continue with the new href.
      });
    });
</script>
</body>
</html>
